package com.ruoyi.sl.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.sl.mapper.SlOfcabsenceMapper;
import com.ruoyi.sl.domain.SlOfcabsence;
import com.ruoyi.sl.service.ISlOfcabsenceService;

/**
 * 行政扣发绩效系数Service业务层处理
 * 
 * @author admin
 * @date 2024-06-10
 */
@Service
public class SlOfcabsenceServiceImpl implements ISlOfcabsenceService 
{
    @Autowired
    private SlOfcabsenceMapper slOfcabsenceMapper;

    /**
     * 查询行政扣发绩效系数
     * 
     * @param ofcabsenceId 行政扣发绩效系数主键
     * @return 行政扣发绩效系数
     */
    @Override
    public SlOfcabsence selectSlOfcabsenceByOfcabsenceId(Long ofcabsenceId)
    {
        return slOfcabsenceMapper.selectSlOfcabsenceByOfcabsenceId(ofcabsenceId);
    }

    /**
     * 查询行政扣发绩效系数列表
     * 
     * @param slOfcabsence 行政扣发绩效系数
     * @return 行政扣发绩效系数
     */
    @Override
    public List<SlOfcabsence> selectSlOfcabsenceList(SlOfcabsence slOfcabsence)
    {
        return slOfcabsenceMapper.selectSlOfcabsenceList(slOfcabsence);
    }

    /**
     * 新增行政扣发绩效系数
     * 
     * @param slOfcabsence 行政扣发绩效系数
     * @return 结果
     */
    @Override
    public int insertSlOfcabsence(SlOfcabsence slOfcabsence)
    {
        slOfcabsence.setCreateTime(DateUtils.getNowDate());
        return slOfcabsenceMapper.insertSlOfcabsence(slOfcabsence);
    }

    /**
     * 修改行政扣发绩效系数
     * 
     * @param slOfcabsence 行政扣发绩效系数
     * @return 结果
     */
    @Override
    public int updateSlOfcabsence(SlOfcabsence slOfcabsence)
    {
        slOfcabsence.setUpdateTime(DateUtils.getNowDate());
        return slOfcabsenceMapper.updateSlOfcabsence(slOfcabsence);
    }

    /**
     * 批量删除行政扣发绩效系数
     * 
     * @param ofcabsenceIds 需要删除的行政扣发绩效系数主键
     * @return 结果
     */
    @Override
    public int deleteSlOfcabsenceByOfcabsenceIds(Long[] ofcabsenceIds)
    {
        return slOfcabsenceMapper.deleteSlOfcabsenceByOfcabsenceIds(ofcabsenceIds);
    }

    /**
     * 删除行政扣发绩效系数信息
     * 
     * @param ofcabsenceId 行政扣发绩效系数主键
     * @return 结果
     */
    @Override
    public int deleteSlOfcabsenceByOfcabsenceId(Long ofcabsenceId)
    {
        return slOfcabsenceMapper.deleteSlOfcabsenceByOfcabsenceId(ofcabsenceId);
    }
}
